//
//  TSImageTextTableViewCell.swift
//  WeChat
//
//  Created by mac on 2018/8/2.
//  Copyright © 2018年 RRC. All rights reserved.
//

import UIKit

class TSImageTextTableViewCell: UITableViewCell {

    var iconImageView:UIImageView!
    var titleLabel:UILabel!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        self.accessoryType = .disclosureIndicator
        
        iconImageView = UIImageView()
        self.contentView.addSubview(iconImageView)
        iconImageView.snp.makeConstraints { (make) in
            make.leading.equalTo(8)
            make.centerY.equalTo(self.contentView)
            make.width.height.equalTo(30)
        }
        
        titleLabel = UILabel()
        titleLabel.textColor = UIColor.black
        titleLabel.font = UIFont.systemFont(ofSize: 17)
        self.contentView.addSubview(titleLabel)
        titleLabel.snp.makeConstraints { (make) in
            make.leading.equalTo(iconImageView.snp.trailing).offset(17)
            make.trailing.equalTo(86)
            make.top.equalTo(3)
            make.bottom.equalTo(3)
        }
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
        
    }
    
    
}
